package com.etc.controller;

import com.etc.entity.CommentResult;
import com.etc.entity.Park;
import com.etc.service.ParkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ParkController {
    @Autowired
    private ParkService parkService;

    @RequestMapping("park/insert")
    public CommentResult insert(@RequestBody Park park)
    {
        int result = parkService.insert(park);
        if (result>0){
            return new CommentResult(200,"success");
        }
        return new CommentResult(444,"failed");
    }
}
